

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>Integration Tests for Kernel Development &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
        <script src="../../../../_static/jquery.js"></script>
        <script src="../../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../../" id="documentation_options" src="../../../../_static/documentation_options.js"></script>
        <script src="../../../../_static/doctools.js"></script>
        <script src="../../../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../../genindex/" />
    <link rel="search" title="Search" href="../../../../search/" />
    <link rel="next" title="Sentry Notes" href="../tests-sentry-developers-guide/" />
    <link rel="prev" title="Analyzing and Debugging A Teuthology Job" href="../tests-integration-testing-teuthology-debugging-tips/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../../">向 Ceph 贡献：开发者指南</a></li>
          <li class="breadcrumb-item"><a href="../">Teuthology 用户指南</a></li>
      <li class="breadcrumb-item active">Integration Tests for Kernel Development</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../../../_sources/dev/developer_guide/testing_integration_tests/tests-integration-testing-teuthology-kernel.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../architecture/">体系结构</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../">开发者指南</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../intro/">简介</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../essentials/">必备知识</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../merging/">何时、合并了什么</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../issue-tracker/">问题追踪器</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../basic-workflow/">基本工作流</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../tests-unit-tests/">测试：单元测试</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../">测试：集成测试(Teuthology)</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../tests-integration-testing-teuthology-intro/">Introduction</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tests-integration-testing-teuthology-workflow/">Workflow</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tests-integration-testing-teuthology-debugging-tips/">Debugging Tips</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Kernel Development</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#cephfs">CephFS</a></li>
<li class="toctree-l4"><a class="reference internal" href="#testing-custom-kernels">Testing custom kernels</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../tests-sentry-developers-guide/">Sentry Notes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../running-tests-locally/">测试：在本地运行测试</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../tests-windows/">测试: Windows</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../dash-devel/">Ceph Dashboard 开发者文档 (之前是 HACKING.rst)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../jaegertracing/">Tracing 开发者文档</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../cephadm/">Cephadm 开发者文档</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../debugging-gdb/">用 GDB 调试</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="integration-tests-for-kernel-development">
<span id="tests-integration-testing-teuthology-kernel"></span><h1>Integration Tests for Kernel Development<a class="headerlink" href="#integration-tests-for-kernel-development" title="Permalink to this heading"></a></h1>
<section id="cephfs">
<span id="kernel-cephfs"></span><h2>CephFS<a class="headerlink" href="#cephfs" title="Permalink to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">fs</span></code> suite runs various kernels as described by the <a class="reference external" href="https://github.com/ceph/ceph/tree/63f84c50e0851d456fc38b3330945c54162dd544/qa/cephfs/mount/kclient/overrides/distro">kernel YAML
fragments</a>. These are symbolically linked by other sub-suites under the <code class="docutils literal notranslate"><span class="pre">fs</span></code>
suite.</p>
<p>The matrix of fragments allows for testing the following configurations:</p>
<ul class="simple">
<li><p>The “stock” kernel on RHEL 8 (i.e. the kernel that ships with it).</p></li>
<li><p>The <a class="reference external" href="https://github.com/ceph/ceph-client/tree/testing">testing branch</a> by the kernel development team which represents the
patches undergoing active testing. These patches may or may not be in the next
upstream kernel release and include a mix of CephFS or kRBD changes. For the
testing kernel, we test with whatever distributions are specified by the
sub-suite. For example, the <code class="docutils literal notranslate"><span class="pre">fs:functional</span></code> sub-suite uses a random selection
of the <a class="reference external" href="https://github.com/ceph/ceph/blob/63f84c50e0851d456fc38b3330945c54162dd544/qa/suites/fs/functional/distro">supported random distros</a>.</p></li>
</ul>
</section>
<section id="testing-custom-kernels">
<h2>Testing custom kernels<a class="headerlink" href="#testing-custom-kernels" title="Permalink to this heading"></a></h2>
<p>If you have a kernel branch on <a class="reference external" href="https://github.com/ceph/ceph-client/tree/testing">ceph-client.git</a> and have built it using
shaman, then you can also test that easily by specifying an override for the
kernel. This is done via a YAML fragment passed to the <code class="docutils literal notranslate"><span class="pre">teuthology-suite</span></code>
command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cat custom-kernel.yaml
overrides:
  kernel:
    branch: for-linus
</pre></div>
</div>
<p>This specifies an override for the kernel branch specified in the suite’s
matrix. You can also specify an override as a tag or SHA1 for the <code class="docutils literal notranslate"><span class="pre">kernel</span></code>
task. When overriding the kernel, you should reduce the selection of jobs as
the matrix will include a number of kernel configurations you won’t care to
test, as mentioned in the <a class="reference internal" href="#kernel-cephfs"><span class="std std-ref">CephFS</span></a> section; the override YAML will
apply to all configurations of the kernel so it will result in duplicate tests.
The command to run tests will look like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><style type="text/css">
span.prompt1:before {
  content: "$ ";
}
</style><span class="prompt1">teuthology-suite<span class="w"> </span>...<span class="w"> </span>--suite<span class="w"> </span>fs<span class="w"> </span>--filter<span class="w"> </span>k-testing<span class="w"> </span>custom-kernel.yaml</span>
</pre></div></div><p>Where <code class="docutils literal notranslate"><span class="pre">...</span></code> indicates other typical options that are normally specified when
running <code class="docutils literal notranslate"><span class="pre">teuthology-suite</span></code>. The important filter <code class="docutils literal notranslate"><span class="pre">--filter</span> <span class="pre">k-testing</span></code>
will limit the selection of jobs to those using the <code class="docutils literal notranslate"><span class="pre">testing</span></code> branch of the
kernel (see the <a class="reference external" href="https://github.com/ceph/ceph/blob/63f84c50e0851d456fc38b3330945c54162dd544/qa/cephfs/mount/kclient/overrides/distro/testing/k-testing.yaml">k-testing.yaml</a> file). So you’ll only select jobs using the
kernel client with the <code class="docutils literal notranslate"><span class="pre">testing</span></code> branch. Your custom YAML file,
<code class="docutils literal notranslate"><span class="pre">custom-kernel.yaml</span></code>, will further override the <code class="docutils literal notranslate"><span class="pre">testing</span></code> branch to use
whatever you specify.</p>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../tests-integration-testing-teuthology-debugging-tips/" class="btn btn-neutral float-left" title="Analyzing and Debugging A Teuthology Job" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../tests-sentry-developers-guide/" class="btn btn-neutral float-right" title="Sentry Notes" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>